package com.lw.smartdevice.mapper;

import com.lw.smartdevice.pojo.SysUserInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/14 17:09
 */
public interface SysUserInfoMapper {


    @Select("select * from sys_user_info where u_id=#{userId}")
    SysUserInfo findById(Long userId);

    @Select("select * from sys_user_info")
    List<SysUserInfo> findAll();

    void addUser(SysUserInfo sysUserInfo);

    @Select("select * from sys_user_info where username=#{username}")
    SysUserInfo findByUsername(String username);

    @Select("select * from sys_user_info where phone=#{phonenum}")
    SysUserInfo findByPhone(String phonenum);

    @Select("select * from sys_user_info where email=#{email}")
    SysUserInfo findByEmail(String email);
}
